<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>basic_socket_streambuf</title>
    <link rel="stylesheet" href="../../boostbook.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
    <link rel="home" href="../../index.html" title="Asio">
    <link rel="up" href="../reference.html" title="Reference">
    <link rel="prev" href="basic_socket_iostream/time_type.html" title="basic_socket_iostream::time_type">
    <link rel="next" href="basic_socket_streambuf/basic_socket_streambuf.html"
          title="basic_socket_streambuf::basic_socket_streambuf">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
    <tr>
        <td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="basic_socket_iostream/time_type.html"><img src="../../prev.png" alt="Prev"></a><a
        accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h"
                                                                                       href="../../index.html"><img
        src="../../home.png" alt="Home"></a><a accesskey="n"
                                               href="basic_socket_streambuf/basic_socket_streambuf.html"><img
        src="../../next.png" alt="Next"></a>
</div>
<div class="section">
    <div class="titlepage">
        <div>
            <div><h3 class="title">
                <a name="asio.reference.basic_socket_streambuf"></a><a class="link" href="basic_socket_streambuf.html"
                                                                       title="basic_socket_streambuf">basic_socket_streambuf</a>
            </h3></div>
        </div>
    </div>
    <p>
        <a class="indexterm" name="asio.indexterm.basic_socket_streambuf"></a>
    </p>
    <p>
        Iostream streambuf for a socket.
    </p>
    <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">typename</span> <a class="link" href="Protocol.html"
                                             title="Protocol requirements">Protocol</a><span class="special">,</span>
    <span class="keyword">typename</span> <span class="identifier">Clock</span> <span class="special">=</span> <span
                class="identifier">chrono</span><span class="special">::</span><span
                class="identifier">steady_clock</span><span class="special">,</span>
    <span class="keyword">typename</span> <a class="link" href="WaitTraits.html" title="Wait traits requirements">WaitTraits</a> <span
                class="special">=</span> <span class="identifier">wait_traits</span><span
                class="special">&lt;</span><span class="identifier">Clock</span><span class="special">&gt;&gt;</span>
<span class="keyword">class</span> <span class="identifier">basic_socket_streambuf</span> <span class="special">:</span>
  <span class="identifier">basic_socket</span><span class="special">&lt;</span> <span class="identifier">Protocol</span> <span
                class="special">&gt;</span>
</pre>
    <h5>
        <a name="asio.reference.basic_socket_streambuf.h0"></a>
        <span><a name="asio.reference.basic_socket_streambuf.types"></a></span><a class="link"
                                                                                  href="basic_socket_streambuf.html#asio.reference.basic_socket_streambuf.types">Types</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/clock_type.html"
                           title="basic_socket_streambuf::clock_type"><span
                                class="bold"><strong>clock_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The clock type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/duration.html"
                           title="basic_socket_streambuf::duration"><span class="bold"><strong>duration</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The duration type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/duration_type.html"
                           title="basic_socket_streambuf::duration_type"><span
                                class="bold"><strong>duration_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        (Deprecated: Use duration.) The duration type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/endpoint_type.html"
                           title="basic_socket_streambuf::endpoint_type"><span
                                class="bold"><strong>endpoint_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The endpoint type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/protocol_type.html"
                           title="basic_socket_streambuf::protocol_type"><span
                                class="bold"><strong>protocol_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The protocol type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/time_point.html"
                           title="basic_socket_streambuf::time_point"><span
                                class="bold"><strong>time_point</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The time type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/time_type.html"
                           title="basic_socket_streambuf::time_type"><span
                                class="bold"><strong>time_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        (Deprecated: Use time_point.) The time type.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.basic_socket_streambuf.h1"></a>
        <span><a name="asio.reference.basic_socket_streambuf.member_functions"></a></span><a class="link"
                                                                                             href="basic_socket_streambuf.html#asio.reference.basic_socket_streambuf.member_functions">Member
        Functions</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/basic_socket_streambuf.html"
                           title="basic_socket_streambuf::basic_socket_streambuf"><span class="bold"><strong>basic_socket_streambuf</strong></span></a>
                        <span class="silver">[constructor]</span>
                    </p>
                </td>
                <td>
                    <p>
                        Construct a basic_socket_streambuf without establishing a connection.
                        <br> <span class="silver"> —</span><br> Construct a basic_socket_streambuf from the supplied
                        socket. <br> <span class="silver"> —</span><br> Move-construct a basic_socket_streambuf from
                        another.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/close.html"
                           title="basic_socket_streambuf::close"><span class="bold"><strong>close</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Close the connection.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/connect.html"
                           title="basic_socket_streambuf::connect"><span
                                class="bold"><strong>connect</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Establish a connection.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/error.html"
                           title="basic_socket_streambuf::error"><span class="bold"><strong>error</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Get the last error associated with the stream buffer.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/expires_after.html"
                           title="basic_socket_streambuf::expires_after"><span
                                class="bold"><strong>expires_after</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Set the stream buffer's expiry time relative to now.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/expires_at.html"
                           title="basic_socket_streambuf::expires_at"><span
                                class="bold"><strong>expires_at</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        (Deprecated: Use expiry().) Get the stream buffer's expiry time
                        as an absolute time. <br> <span class="silver"> —</span><br> Set the stream buffer's expiry
                        time as an absolute time.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/expires_from_now.html"
                           title="basic_socket_streambuf::expires_from_now"><span
                                class="bold"><strong>expires_from_now</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        (Deprecated: Use expiry().) Get the stream buffer's expiry time
                        relative to now. <br> <span class="silver"> —</span><br> (Deprecated: Use expires_after().)
                        Set the stream buffer's expiry time relative to now.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/expiry.html"
                           title="basic_socket_streambuf::expiry"><span class="bold"><strong>expiry</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Get the stream buffer's expiry time as an absolute time.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/operator_eq_.html"
                           title="basic_socket_streambuf::operator="><span
                                class="bold"><strong>operator=</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Move-assign a basic_socket_streambuf from another.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/puberror.html"
                           title="basic_socket_streambuf::puberror"><span class="bold"><strong>puberror</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        (Deprecated: Use error().) Get the last error associated with the
                        stream buffer.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/socket.html"
                           title="basic_socket_streambuf::socket"><span class="bold"><strong>socket</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Get a reference to the underlying socket.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/_basic_socket_streambuf.html"
                           title="basic_socket_streambuf::~basic_socket_streambuf"><span class="bold"><strong>~basic_socket_streambuf</strong></span></a>
                        <span class="silver">[destructor]</span>
                    </p>
                </td>
                <td>
                    <p>
                        Destructor flushes buffered data.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.basic_socket_streambuf.h2"></a>
        <span><a name="asio.reference.basic_socket_streambuf.protected_member_functions"></a></span><a class="link"
                                                                                                       href="basic_socket_streambuf.html#asio.reference.basic_socket_streambuf.protected_member_functions">Protected
        Member Functions</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/overflow.html"
                           title="basic_socket_streambuf::overflow"><span class="bold"><strong>overflow</strong></span></a>
                    </p>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/setbuf.html"
                           title="basic_socket_streambuf::setbuf"><span class="bold"><strong>setbuf</strong></span></a>
                    </p>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/sync.html"
                           title="basic_socket_streambuf::sync"><span class="bold"><strong>sync</strong></span></a>
                    </p>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link" href="basic_socket_streambuf/underflow.html"
                           title="basic_socket_streambuf::underflow"><span
                                class="bold"><strong>underflow</strong></span></a>
                    </p>
                </td>
                <td>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.basic_socket_streambuf.h3"></a>
        <span><a name="asio.reference.basic_socket_streambuf.requirements"></a></span><a class="link"
                                                                                         href="basic_socket_streambuf.html#asio.reference.basic_socket_streambuf.requirements">Requirements</a>
    </h5>
    <p>
        <span class="emphasis"><em>Header: </em></span><code class="literal">asio/basic_socket_streambuf.hpp</code>
    </p>
    <p>
        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">
    <tr>
        <td align="left"></td>
        <td align="right">
            <div class="copyright-footer">Copyright © 2003-2022 Christopher M. Kohlhoff<p>
                Distributed under the Boost Software License, Version 1.0. (See accompanying
                file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
            </div>
        </td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="basic_socket_iostream/time_type.html"><img src="../../prev.png" alt="Prev"></a><a
        accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h"
                                                                                       href="../../index.html"><img
        src="../../home.png" alt="Home"></a><a accesskey="n"
                                               href="basic_socket_streambuf/basic_socket_streambuf.html"><img
        src="../../next.png" alt="Next"></a>
</div>
</body>
</html>
